﻿@{
    Layout = null;
}
<!DOCTYPE html>
<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>Login</title>
</head>
<body>
    <div>
        <br /><br />
        <button onclick="login()">登录</button>
        <br /><br />
    </div>
    @Scripts.Render("~/script/common")
    <script type="text/javascript">
        function login() {
            $.ajax({
                url: '/login/submit'
                , type: 'post'
                , data: {}
                , beforeSend: function (jqXHR, settings) {
                }
                , complete: function (jqXHR, textStatus) {
                }
                , success: function (res) {
                    alert(res);
                    window.location.href = '/';
                }, error: function (err, msg) {
                    alert(msg);
                }
            });
        }
    </script>
</body>
</html>
